Back
MASM : FLOATING POINT : FNORM_XX
FNORM_XX:

Syntax:

Description:

FNORM_PP normal operation multiplies the contents of Rs0 and Rs1 and adds the contents of Rs2 to multiplication result, then moves the result to Rs3 according to BS (bank select). Briefly, it makes "+(a*b+c)", where "a, b, c" are contents of registers Rs0, Rs1 and Rs2 correspondingly. Sign of the final result is "+".

Other floating point normal operations are similar. The suffix of the instruction, e.g. "PM" stands for: sign of whole expression - "Plus" and sign inside the expression - "Minus". Suffix "A", means to take an absolute value of the expression. Operations perform:

  • FNORM_PP : +(a*b+c)
  • FNORM_PM : +(a*b-c)
  • FNORM_MP : -(a*b+c)
  • FNORM_MM : -(a*b-c)
  • FNORM_AP : |a*b+c|
  • FNORM_AM : |a*b-c|

Microcode patterns (see below) for floating normal operations are differ only in MPC field, where the values are:

  • for FNORM_PP : FN00
  • for FNORM_PM : FN01
  • for FNORM_MP : FN02
  • for FNORM_MM : FN03
  • for FNORM_AP : FN10
  • for FNORM_AM : FN11

All the instructions are stack conditioned.

Microcode Pattern:

Takes 8 cycles to execute.
    Example: FNORM_PP 0xA3 3 0xA0 0xA1 0xA2

	  
	 MPC  BS3 C3 P3 P2 P1 P0
	------------------------
	FN00   0  0  00 00 A1 A0
	  -    0  0  00 00 00 00
	  -    0  0  00 A2 00 00
	  -    0  0  00 00 00 00
	  -    0  0  00 00 00 00
	  -    0  0  00 00 00 00
	  -    0  0  00 00 00 00
	  -    3  0  A3 00 00 00

	  
Exceptions :

Configuration Register: 0x30 (CrFiluExc)

Exception No. Mask R/W Access Name
[0] 00000000 00000001 RW ALU Bad Operand (Low Bank)
[1] 00000000 00000002 RW ALU Bad Operand (High Bank)
[2] 00000000 00000004 RW ALU Denormalized Input (Low Bank)
[3] 00000000 00000008 RW ALU Denormalized Input (High Bank)
[4] 00000000 00000010 RW ALU Denormalized Output (Low Bank)
[5] 00000000 00000020 RW ALU Denormalized Output (High Bank)
[6] 00000000 00000040 RW ALU Overflow (Low Bank)
[7] 00000000 00000080 RW ALU Overflow (High Bank)

Example :

FNORM_PP 0xA3 3 0xA0 0xA1 0xA2  !! multiplies the contents of 0xA0 
                                !! and 0xA1, adds the contents of 
                                !! 0xA2 to multiplication result and
                                !! puts the final result in 0xA3

APE Group Zeuthen. 2003
$Id: fnorm_masm.php,v 1.3 2004/08/04 09:41:46 noe Exp $
$Id: syntax.php,v 1.8 2004/08/04 09:25:34 noe Exp $